package com.wql.controller;

import com.aaa.entity.OOrder;
import com.aaa.util.PayUtils;
import com.aaa.vo.Result;
import com.wql.service.OOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author wql
 * @version 1.0
 * @date 2023/3/9 10:24
 */
@RestController
@RequestMapping("/business")
public class VXpayController {
        @Autowired
        private OOrderService oOrderService;

        @PostMapping("/order/buyWei")
        public Result buyNow( @RequestBody PayUtils payUtils){
           return  oOrderService.createCode(payUtils);
        }
        @RequestMapping("/order/paystatus/{orderno}")
        public Result payStatus(@PathVariable String orderno){
                return  oOrderService.queryPayStatus(orderno);
        }


}
